package com.itcast.mapper;

import com.itcast.pojo.Orders;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ${author}
 * @since 2020-06-19
 */
@Repository
@Mapper
public interface OrdersMapper extends BaseMapper<Orders> {
    //SELECT count(*) FROM orders where DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= date(createDate)
    //SELECT count(*) FROM orders WHERE TO_DAYS( NOW( ) ) - TO_DAYS( createDate) = 2
    List<String> countorders(int id);

    Map<String,Object> hotSale();

}
